package com.dong.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.dong.remote.ProducerRemote;

/**
 * @author: 594781919@qq.com
 * @date: 2018/5/8
 */
@RestController
public class ConsumerController {

    @Autowired
    private ProducerRemote producerRemote;

    @GetMapping("/")
    public String get() {
        return "1Consumer: " + producerRemote.get();
    }
	@RequestMapping(value = "/info" ,method = RequestMethod.GET)
    public String info(String username) {  
        return "hi "+username+" I am is spring-service1"; //测试代码直接返回一个字符串，不再调用service层等等。  
    }
	@RequestMapping(value = "/name" ,method = RequestMethod.GET)
    public String name() {
        return "my name is spring-service1"; //测试代码直接返回一个字符串，不再调用service层等等。  
    }

}
